home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 210 / 210.d81 / b.speed basic (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  5KB  |  172 lines

  1. 3 poke53280,1:poke53281,1:poke646,5:clr:print"[147]"chr$(14)chr$(8)
  2. 5 gosub60100:goto430
  3. 9 :
  4. 10 rem====press any key prompt=======
  5. 11 :
  6. 12 x=13:y=24:w$="[144][208]ress any key[145][145][145]":gosub66
  7. 14 geta$:ifa$=""then14
  8. 15 return
  9. 63 :
  10. 64 rem========print at=======
  11. 65 :
  12. 66 poke 783,peek(783)and254:poke782,x:poke781,y:sys65520:printw$
  13. 67 poke783,peek(783)or1:return
  14. 68 z9=ti:fori=1toz:next:z8=ti
  15. 69 w$="[197]mpty [204]oop":return
  16. 72 z9=ti:fori=1toz:a=z:next:z8=ti
  17. 73 w$="[193]=[218]       ":return
  18. 76 z9=ti:fori=1toz:a=100:next:z8=ti
  19. 77 w$="[193]=100     ":return
  20. 80 z9=ti:fori=1toz:a=z/50:next:z8=ti
  21. 81 w$="[193]=[218]/50    ":return
  22. 84 z9=ti:fori=1toz:a=z*.02:next:z8=ti
  23. 85 w$="[193]=[218]*.02   ":return
  24. 88 z9=ti:fori=1toz:a=z/.02:next:z8=ti
  25. 89 w$="[193]=[218]/.02   ":return
  26. 96 z9=ti:fori=1toz:a=z*z7:next:z8=ti
  27. 97 w$="[193]=[218]*[218]7 (50)":return
  28. 100 z9=ti:fori=1toz:a=z*z6:next:z8=ti
  29. 101 w$="[193]=[218]*[218]6 (.02)":return
  30. 108 z9=ti:fori=1toz
  31. 109 rem this is a typical long rem          statement for timing purposes only
  32. 110 next
  33. 111 z8=ti:w$="[210][197][205][160]statement":return
  34. 131 :
  35. 132 rem ==== diskread subroutine ======
  36. 133 :
  37. 134 l=len(f$):rem f$=name of ssfile
  38. 136 b=951:pokeb,l+2:pokeb+l+1,44:pokeb+2+l,80
  39. 138 fori=0tol-1:pokeb+1+i,asc(mid$(f$,i+1,1)):next
  40. 139 print"[147] ";
  41. 140 poke909,1:rem poke speed here
  42. 142 sys828
  43. 144 return
  44. 346 :
  45. 347 rem ====variable demo========
  46. 348 :
  47. 350 f$="vd":gosub134:gosub12:clr:dimz9,z8,i,a
  48. 355 print"[147]         [211][201][205][208][204][197] [214][193][210][201][193][194][204][197] [196][197][205][207]"
  49. 360 printtab(24)"[198]irst"tab(32)"[211]econd"
  50. 365 print"    [211]tart of variables[129]"tab(24)peek(45)+256*peek(46)
  51. 370 print"    [197]nd of variables[129]"tab(24)peek(47)+256*peek(48)-1
  52. 375 z=100:z7=50:z6=.02:deffna(x)=z7*z6-z*z7
  53. 380 print:fork=1to9
  54. 385 onkgosub68,72,76,80,84,88,96,100,108
  55. 390 printtab(6)""w$;tab(25);"[129]";z8-z9
  56. 395 next
  57. 400 clr:dimz9,z8,i,a
  58. 401 dim a1,a2,a3,a4,a5,a6,a7,a8,a9,a0,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak
  59. 402 dimb1,b2,b3,b4,b5,b6,b7,b8,b9,b0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c0,d1,d2,d3,d4
  60. 403 dimd5,d6,d7,d8,d9,d0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e0,f1,f2,f3,f4,f5,f6,f7,f8
  61. 404 dimf9,f0,g1,g2,g3,g4,g5,g6,g7,g8,g9,g0,h1,h2,h3,h4,h5,h6,h7,h8,h9,h0
  62. 405 k=1:z=100:z7=50:z6=.02:deffna(x)=z7*z6-z*z7
  63. 408 print"[129]"
  64. 410 printtab(32)peek(45)+256*peek(46)
  65. 411 printtab(32)peek(47)+256*peek(48)-1
  66. 412 print:fork=1to9
  67. 414 onkgosub68,72,76,80,84,88,96,100,108
  68. 416 printtab(33)z8-z9
  69. 418 next
  70. 419 print" [206]otice that when the variable [129][218] is"
  71. 420 print" added (in the [211]econd run), the time"
  72. 421 print" to go through the loops is appreciably  increased."
  73. 422 gosub12
  74. 424 print"[147]":f$="vc":gosub134:gosub12
  75. 427 :
  76. 428 rem ========menu===================
  77. 429 :
  78. 430 print"[147]     [193] [196][197][205][207][206][211][212][210][193][212][201][207][206] [207][198] [212][200][197] [211][208][197][197][196] [207][198]
  79. 431 [153]"   str$right$(NULL)val(NULL)(NULL)right$(NULL)(NULL)right$(NULL)chr$ atn(NULL)str$ str$valascright$(NULL)right$(NULL)chr$ (NULL)atn(NULL)right$atnpeek(NULL)val(NULL)"
  80. 432 [153][163]12)"clrby (NULL)aurice mid$ones"
  81. 433 [153]"             (NULL)left$valcloseasc(NULL)(NULL)(NULL) close(NULL)'(NULL)closeclose"
  82. 434 [153]"         stop1. (NULL)un (NULL)atn(NULL)right$atnpeek(NULL)val demo"
  83. 435 [153]"         stop2. (NULL)un atn(NULL)(NULL)atn(NULL) demo"
  84. 436 [153]"         stop3. (NULL)ead methodology"
  85. 438 [153]"         stop4. (NULL)eturn to (NULL)(NULL)atnstr$(NULL)(NULL)atn(NULL)"
  86. 439 [153]"           for(NULL)lease choose an (NULL)  "
  87. 440 [141]14:[139]a$[179]"1"[176]a$[177]"4"[167][141]14
  88. 444 [145] [197](a$)[137]350,500,600,60000
  89. 496 :
  90. 497 [143] ====array demo======
  91. 498 :
  92. 500 f$[178]"ad":[141]134:[141]12
  93. 501 [153]"loadstop            atn(NULL)(NULL)atn(NULL) (NULL)atn(NULL)right$atnpeek(NULL)val str$val(NULL)(NULL)"
  94. 502 [153][163]20)"#1     #2     #3"
  95. 503 [156]:[134]a(20,50),s,f,b(20,50),c(20,50),d(20,50)
  96. 510 [153]" (NULL)tart of arraysfor"[163]18)[194](47)[170]256[172][194](48)
  97. 512 [153]" valnd of arraysfor"[163]18)[194](49)[170]256[172][194](50)[171]1
  98. 516 s[178]ti:a[178]3:f[178]ti:[153]" atndd new variablefor"[163]19)f[171]s
  99. 518 s[178]ti:b[178]3:f[178]ti:[153]" atndd anotherfor"[163]19)f[171]s
  100. 520 [151]214,12:[153]:[153]"stop #1 - str$efining variables after defining
  101. 522 print"      4000 array variables"
  102. 524 fort=1to2000:next:clr
  103. 526 dimrq%(308),m%(11),f$(11),g$(11),p%(11),pp%(13),y%(11),u%(11),hs%(11,4)
  104. 528 dim na$(11,4),mh%(3)
  105. 530 print"[129]"
  106. 532 printtab(25)peek(47)+256*peek(48)
  107. 534 print:printtab(25)peek(49)+256*peek(50)-1
  108. 536 s=ti:a=3:f=ti:print:printtab(27)f-s
  109. 538 s=ti:b=3:f=ti:print:printtab(27)f-s
  110. 540 poke214,15:print:print"[144] #2 - [196]efining variables after defining"
  111. 542 print"      1202 [201][206][212][197][199][197][210] array variables"
  112. 544 fort=1to2000:next:clr
  113. 546 dimrq(308),m%(11),f$(11),g$(11),p%(11),pp%(13),y%(11),u%(11),hs%(11,4)
  114. 548 dim na$(11,4),mh%(3)
  115. 550 print"[129]"
  116. 552 printtab(32)peek(47)+256*peek(48)
  117. 554 print:printtab(32)peek(49)+256*peek(50)-1
  118. 556 s=ti:a=3:f=ti:print:printtab(34)f-s
  119. 558 s=ti:b=3:f=ti:print:printtab(34)f-s
  120. 560 poke214,18:print:print"[144] #3 - [196]efining variables after defining"
  121. 562 print"      1202 [210][197][193][204] array variables"
  122. 580 gosub12:goto430
  123. 596 :
  124. 597 rem =====read explanation=====
  125. 598 :
  126. 600 print"[147]"
  127. 604 f$="ex1":gosub134:gosub12:f$="ex2":print"[147]":gosub134:gosub12:goto430
  128. 997 :
  129. 998 rem ====scratch and save====
  130. 999 :
  131. 10000 d=peek(186):n$="b.speed basic":open15,d,15,"s0:"+n$:close15:saven$,d:end
  132. 40000 fori=0to21:poke828+i,8+i:next
  133. 40010 ifdv<8ordv>29ordv=8then40030
  134. 40020 a=peek(828):b=peek(828+dv-8):poke828,b:poke828+dv-8,a
  135. 40030 a$="hello connect":forj=8to29:i=peek(828+j-8):ifi=14thennext
  136. 40040 close2:open2,i,2:close2:ifstthen40060
  137. 40050 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then40070
  138. 40060 next:print"[147]":poke53272,23:poke186,8:end
  139. 40070 q$=chr$(34):poke646,peek(53281):print"[147]":poke53272,23
  140. 40080 print"[147]p[207]2048,0:p[207]44,8:p[207]43,1:p[207]56,160:p[207]55,0:clr:l[207]"q$a$q$","i
  141. 40090 print"run:":poke631,13:poke632,13:poke198,2:end
  142. 50097 :
  143. 50098 rem==reconnect and load reader===
  144. 50099 :
  145. 60000 goto40000:remr0:hello connect=hello connect":input#15,er:close15
  146. 60010 [139] er[179][177]63 [167] [153]"load":[128]
  147. 60020 a$[178]"hello connect":q$[178][199](34)
  148. 60030 [153]"loadload"q$a$q$",8"
  149. 60040 [153]"run":[151]631,13:             [151]632,13:[151]198,2:[128]
  150. 60100 [129]i[178]828[164]969:[135]a:[151]i,a:[130]:[142]
  151. 60102 [131] 173,183,003,162,184,160,003
  152. 60104 [131] 032,189,255,169,001,162,008
  153. 60106 [131] 160,000,032,186,255,032,192
  154. 60108 [131] 255,162,001,032,198,255,032
  155. 60110 [131] 207,255,032,207,255,032,207
  156. 60112 [131] 255,141,059,003,032,183,255
  157. 60114 [131] 041,064,208,068,173,059,003
  158. 60116 [131] 201,128,176,236,173,059,003
  159. 60118 [131] 201,064,176,033,173,059,003
  160. 60120 [131] 201,031,144,034,173,059,003
  161. 60122 [131] 201,031,240,035,173,059,003
  162. 60124 [131] 032,210,255,162,020,160,000
  163. 60126 [131] 136,208,253,202,208,248,076
  164. 60128 [131] 093,003,173,059,003,105,127
  165. 60130 [131] 076,137,003,173,059,003,105
  166. 60132 [131] 064,076,137,003,169,013,076
  167. 60134 [131] 137,003,169,001,032,195,255
  168. 60136 [131] 032,204,255,096,007,066,076
  169. 60138 [131] 085,082,066,044,080,048,048
  170. 60140 [131] 048,048,048,048,048,048,048
  171. 60142 [131] 048,048
  172.